package com.appointmentmanager.service;

import java.util.List;

import com.appointmentmanager.model.Project;
import com.appointmentmanager.model.User;


public interface ProjectService {
	
	/**
	 * Returns the project with given id
	 * 
	 * @param pid The id of the project
	 */
	Project findProject(Long pid);
	
	/**
	 * Returns the project with given name
	 * 
	 * @param name The name of the project
	 */
	Project findProject(String name);
	
	/**
	 * Returns all the project in systems
	 */
	List<Project> findAllProjects();
	
	/**
	 * Returns the projects manages by the given user
	 */
//	List<Project> findManagedProjects(User user);
	
	/**
	 * Returns the projects that have the given user as a activate contributor 
	 */
//	List<Project> findContributedProjects(User user);
	
	/**
	 * Returns the projects that are not manage by the given user and not a contributor 
	 */
//	List<Project> findNonContributedProjects(User user);
	
	/**
	 * Returns the private projects that have the given user as a activate contributor if privacy is true,
	 * otherwise returns the public projects that have the given user as a activate contributor 
	 */
//	List<Project> findNonContributedProjects(User user, boolean privacy);
	
	/**
	 * Returns a list of active contributor of the project with the given id
	 * 
	 *  @param pid The project id
	 */
//	List<User> findProjectContributor(Long pid);
	
	/**
	 * Returns a list of non approve project contributor of the project with the given id
	 * 
	 * @param pid The project id
	 */
//	List<User> findProjectPendingUser(Long pid);
	
	/**
	 * Creates a new project to the system
	 * 
	 * @param name The name of the project
	 * @param description The description of the project
	 * @param isPrivate The privacy of the project
	 * @param mid The user id of the manager of the new project
	 */
	boolean addNewProject(String name, String description, boolean isPrivate, Long mid);
	
	/**
	 * Delete the project with given project id
	 * 
	 * @param pid The project id
	 */
	boolean deleteProject(Long pid);
	
	/**
	 * Add a contributor to a project
	 * 
	 * @param pid The project id
	 * @param uid The contributor user id
	 */
//	boolean addProjectContributor(Long pid, Long uid);
	
	/**
	 * Remove the contributor from the given project
	 * 
	 * @param pid The project id
	 * @param uid The contributor user id
	 */
//	boolean removeProjectContributor(Long pid, Long uid);
	
	/**
	 * Process the contributor request for a give the project 
	 * 
	 */
//	void processProjectContributorRequest(Project project, User contributor);
	
	/**
	 * Returns the status of a user in the project
	 * 
	 * @param uid The contributor id
	 * @param p The Project to checked
	 */
	String getProjectStatus(Long uid, Project p);
	
	
}
